package bigbrother;

import bigbrother.core.IrcBotCore;
import bigbrother.webportal.WebPortal;
import org.apache.wicket.protocol.http.WebApplication;

/**
 * A web application that shows a portal for the irc bot, containing links to the chat logs and such.
 * <p/>
 * If you want to run this application without deploying, run the Start class in the test directory.
 *
 * @author Hans Haggstrom
 */
public final class BigBrotherWebPortal
        extends WebApplication
{
    // TODO: Check if it is ok to start the irc bot from here?
    // TODO: Communication between web page session and the irc bot modules probably need to be syncronized, as
    // they will be running in different threads?

    // Start irc bot
    private static final BigBrother theBigBrother = new BigBrother( null );

    public static final IrcBotCore getIrcContext()
    {
        return theBigBrother.getIrcContext();
    }

    /**
     * Constructor
     */
    public BigBrotherWebPortal()
    {
    }

    public Class getHomePage()
    {
        return WebPortal.class;
    }

}
